package tr.edu.ege.kipler.satisfiability.completion.rules.nondeterminism;

import java.util.HashSet;
import java.util.Set;

import tr.edu.ege.kipler.satisfiability.UnsatisfiableException;
import tr.edu.ege.kipler.satisfiability.container.World;
import tr.edu.ege.kipler.satisfiability.container.WorldConstraintSystem;

/**
 * 
 * @author İnanç Seylan
 *
 */
public abstract class BranchingPoint {
	private WorldConstraintSystem wcs;

	private World world;

	private Set<WorldConstraintSystem> lastDependencySet = new HashSet<WorldConstraintSystem>();

	/**
	 * @return the wcs
	 */
	public WorldConstraintSystem getWcs() {
		return wcs;
	}

	/**
	 * @param wcs
	 *            the wcs to set
	 */
	public void setWcs(WorldConstraintSystem wcs) {
		this.wcs = wcs;
	}

	/**
	 * @return the world
	 */
	public World getWorld() {
		return world;
	}

	/**
	 * @param world
	 *            the world to set
	 */
	public void setWorld(World world) {
		this.world = world;
	}

	public void setLastBranchDependencies(
			Set<WorldConstraintSystem> dependencies) {
		lastDependencySet = dependencies;
	}

	public Set<WorldConstraintSystem> getLastBranchDependencies() {
		return lastDependencySet;
	}

	public abstract boolean hasNext();

	public abstract WorldConstraintSystem next() throws UnsatisfiableException;

}
